<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="http://egonw.github.io/blog/feed/by_tag/rdfa.xml" rel="self" type="application/atom+xml" /><link href="http://egonw.github.io/blog/" rel="alternate" type="text/html" /><updated>2026-08-17T08:48:36+00:00</updated><id>http://egonw.github.io/blog/feed/by_tag/rdfa.xml</id><title type="html">chem-bla-ics</title><subtitle>Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.</subtitle><author><name>Egon Willighagen</name></author><entry><title type="html">XHTML+RDFa: chemical examples</title><link href="http://egonw.github.io/blog/2010/08/10/xhtmlrdfa-chemical-examples.html" rel="alternate" type="text/html" title="XHTML+RDFa: chemical examples" /><published>2010-08-10T00:00:00+00:00</published><updated>2010-08-10T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2010/08/10/xhtmlrdfa-chemical-examples</id><content type="html" xml:base="http://egonw.github.io/blog/2010/08/10/xhtmlrdfa-chemical-examples.html"><![CDATA[<p>Steffen <a href="http://chem-bla-ics.blogspot.com/2010/08/xhtmlrdfa-template.html?showComment=1281418346085#c5562162287116420044">asked</a>
me if I could also provide a few examples on how to actually put RDF triples in the HTML, as the
<a href="http://chem-bla-ics.blogspot.com/2010/08/xhtmlrdfa-template.html">template</a> I gave yesterday is a mere empty canvas to draw the
triples on. There are actually <a href="https://chem-bla-ics.linkedchemistry.info/tag/rdfa">various examples <i class="fa-solid fa-recycle fa-xs"></i></a>
in my blog, which I will summarize here.</p>

<p>Before I start, I like to put some emphasize on the following <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">RDFa</a> pattern. An RDF
resource that serves as subject is always mapped to a HTML element. This can be a div element, but also other elements, as we
will see in the example.</p>

<h3 id="a-molecule-smiles">A molecule SMILES</h3>

<p>The <a href="http://chem-bla-ics.blogspot.com/2006/12/including-smiles-cml-and-inchi-in.html">oldest RDFa example</a> in my blog is from</p>
<ol>
  <li>That was almost two years before the final <a href="http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014">Recommendation</a>, and
is not quite accurate anymore. But here’s the correct version:</li>
</ol>

<script src="https://gist.github.com/517826.js?file=gistfile1.html">
</script>

<p>This example shows how to embed the SMILES string CCO semantically. This example shows that the outer most span element is
used to define the subject of the <a href="http://www.w3.org/TR/rdf-concepts/#section-triples">RDF triple</a>, using the @about
attribute to define the <a href="http://www.w3.org/TR/rdf-concepts/#section-URI-Vocabulary">URI of the resource</a>: <em>#ethanol</em>.
Note that this URI is relative to the URI of the HTML page in which it is embedded. Later we will see an example with a full URI.</p>

<h3 id="but-i-dont-want-to-hack-html">But I don’t want to hack HTML!</h3>

<p>Yeah, fair point. Just make a point with your publisher when you submit a new paper. It is the duty of the publisher and
your software vendor to do this right. In 2008 I wrote a small <a href="https://wiki.mozilla.org/Labs/Ubiquity">Ubiquity</a> script
to automagically
<a href="http://chem-bla-ics.blogspot.com/2008/09/ubiquity-fun-entering-semantic-markup.html">convert an InChI into semantified HTML content</a>.
But I am not sure this script still works. If interesting, let me know, and I will revive the Firefox thingy.</p>

<h3 id="and-why-would-i-want-to-do-it-anyway">And why would I want to do it anyway??</h3>

<p>Because software can more easily understand what you mean. This is why Google is now pushing
<a href="http://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html">rich snippets</a>.
<a href="http://cb.openmolecules.net/">Chemical blogspace</a> understands them too, allowing you to see
<a href="http://chem-bla-ics.blogspot.com/2007/05/cb-comments-for-inchis.html">blog posts about molecules on other webpages</a>.
With a simple bit of JavaScript you can link from your webpages, you can
<a href="http://chem-bla-ics.blogspot.com/2007/01/chemistry-in-html-javascript-from.html">enrich your HTML sites with semantic chemistry</a> yourself.
<a href="http://www.bioclipse.net/">Bioclipse</a> also has no problem with extracting
<a href="http://chem-bla-ics.blogspot.com/2010/01/semantic-web-features-in-bioclipse-22.html">the RDF from HTML</a>.
Even <a href="http://chem-bla-ics.blogspot.com/2010/07/scripts-logs-as-htmlrdfa-mix-free-text.html">Firefox can understand it</a>.
Really, there is no end to it.</p>

<p>Of course, why you should do this comes basically down to Molecular Chemometrics Principle #2, but I have not written that
on up yet (see also <a href="http://chem-bla-ics.blogspot.com/2010/08/molecular-chemometrics-principles-1.html">McPrinciple #1</a>).</p>

<h3 id="reporting-problems-with-molecular-representations">Reporting problems with molecular representations</h3>

<p>More recently, I reported about using RDFa in human readable log file for computations I am doing (see
<a href="http://chem-bla-ics.blogspot.com/2010/07/scripts-logs-as-htmlrdfa-mix-free-text.html">Scripts logs as HTML+RDFa: mix free text reporting with CSV</a>). 
That code looks like:</p>

<script src="https://gist.github.com/517889.js?file=gistfile1.html"></script>

<p>This example uses a <em>div</em> element to host the subject resource. Again, the resource URI is relative to the URI of
the document, e.g. <a href="http://rdf.farmbio.uu.se/uppmax-cdk/results.html">this one</a>. We can also note a new attribute,
<em>@typeof</em>, which is here used to define the <a href="http://www.w3.org/TR/rdf-schema/#ch_type">rdf:type</a> of the <em>#200234</em> resource.</p>

<p>This code snippet does not define the <em>um</em> namespace, which was done elsewhere in the HTML. Moreover, this
code snippet does not actually reuse existing ontologies, which is highly recommended. The
<a href="http://chem-bla-ics.blogspot.com/2010/06/it-is-my-great-pleasure-to-present-full.html">upcoming RDF symposium in Boston</a>
will tell you all about chemical ontologies in the RDF world (see <a href="http://egonw.github.com/acsrdf2010/">this detailed program</a>,
which itself is HTML+RDFa!). But, if you would just overlook the ad hoc namespaces used, you might appreciate the
nesting: besides the compound (<em>#200234</em>), a second resource is defined (#error0). In total, this example contains six triples.</p>

<p>Meanwhile, the output simply looks like:</p>

<div about="#200234" typeof="um:Compound">CID <span property="um:cid" datatype="xsd:integer">200234</span>: <span rel="um:hasProblem"><span about="#error0" typeof="um:Problem"><span property="um:hasElement">Ti</span><span property="um:hasIndex" datatype="xsd:integer">1</span></span></span></div>

<h3 id="a-molecule-table">A molecule table</h3>

<p>This third, and for now last, example shows several other features. This HTML snippet show a one entry
molecule table, very much like those molecular spreadsheets in Excel, but than right here in your webbrowser.
(Can you imagine what happens if we mash this up with
<a href="https://doi.org/10.59350/3basz-t0n97 :">JavaScript molecular viewers <i class="fa-solid fa-recycle fa-xs"></i></a></p>

<script src="https://gist.github.com/517927.js?file=gistfile1.html"></script>

<p>First of all, the <a href="http://chem-bla-ics.blogspot.com/search?q=rdf.openmolecules.net">rdf.openmolecules.net</a> project
is used to construct an absolute URI for the molecule. The table then gives some properties of the molecule:
its name (using <a href="http://dublincore.org/">Dublin Core</a>, though perhaps <a href="http://www.w3.org/TR/rdf-schema/#ch_label">rdfs:label</a>
is better), the boiling point (nicely encoded as <em>t0</em> in <a href="https://doi.org/10.1021/ja01193a005">this 1947 paper</a>),
two cheminformatics descriptors, and the SMILES, using the same approach as the first example in this post.</p>

<p>The output of this table looks like:</p>

<table xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://github.com/egonw/cheminformatics.classics/1/#" xmlns:dc="http://purl.org/dc/terms/" xmlns:chem="http://www.blueobelisk.org/chemistryblogs/">
  <tbody><tr typeof="cc:molecule" about="http://rdf.openmolecules.net/?InChI=1/C4H10/c1-3-4-2/h3-4H2,1-2H3">
    <td><span property="dc:title">n-Butane</span></td>
    <td><span property="cc:t0">-0.5</span></td>
    <td><span property="cc:w0">10</span></td>
    <td><span property="cc:p0">1</span></td>
    <td><span property="chem:smiles">CCCC</span></td>
  </tr>
  </tbody>
</table>

<p>I will shortly blog about the source of the above code snippet, but you are invited to go ahead and checkout
<a href="http://github.com/egonw">my GitHub activity</a> (<a href="http://github.com/egonw.atom">RSS</a>).</p>

<p>Steffen, I think these examples should get you pretty far, but please let me know if you have further questions!</p>]]></content><author><name>Egon Willighagen</name></author><category term="html" /><category term="rdf" /><category term="justdoi:10.59350/3basz-t0n97" /><category term="justdoi:10.1021/ja01193a005" /><category term="rdfa" /><summary type="html"><![CDATA[Steffen asked me if I could also provide a few examples on how to actually put RDF triples in the HTML, as the template I gave yesterday is a mere empty canvas to draw the triples on. There are actually various examples in my blog, which I will summarize here.]]></summary></entry><entry><title type="html">XHTML+RDFa Template</title><link href="http://egonw.github.io/blog/2010/08/09/xhtmlrdfa-template.html" rel="alternate" type="text/html" title="XHTML+RDFa Template" /><published>2010-08-09T00:00:00+00:00</published><updated>2010-08-09T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2010/08/09/xhtmlrdfa-template</id><content type="html" xml:base="http://egonw.github.io/blog/2010/08/09/xhtmlrdfa-template.html"><![CDATA[<p>There was some <a href="http://jessykate.posterous.com/activity-streams-for-open-science">more</a> <a href="http://jessykate.posterous.com/open-science-microformats-initial-thoughts">discussion</a>
on machine readability of notebooks again, something I have <a href="http://chem-bla-ics.blogspot.com/search?q=RDFa&amp;max-results=20">blogged</a>
<a href="http://chem-bla-ics.blogspot.com/search?q=microformats&amp;max-results=20">about</a> for a long time now.</p>

<p>One technical approach to implement the idea of adding semantic to text in HTML pages is <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">RDFa</a>.
But with any technology, scientists seems to have an in-built deficiency of thinking clearly, and anything beyond being able to format
your bibliography with the correct <strong>bold</strong> and <em>italic</em> seems to be a bit much asked.</p>

<p>Anyway, for future reference, this is a basic HTML framework for embedding RDFa:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="cp">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
    "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"&gt;</span>
<span class="nt">&lt;html</span> <span class="na">xmlns=</span><span class="s">"http://www.w3.org/1999/xhtml"</span>
    <span class="na">version=</span><span class="s">"XHTML+RDFa 1.0"</span> <span class="na">xml:lang=</span><span class="s">"en"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;head&gt;</span>
    <span class="nt">&lt;title&gt;</span>ACS RDF Symposium, Boston, August 2010<span class="nt">&lt;/title&gt;</span>
  <span class="nt">&lt;/head&gt;</span>
  <span class="nt">&lt;body&gt;</span>
  <span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</code></pre></div></div>

<p>Perhaps you prefer the <a href="http://github.com/egonw/cheminformatics.classics/raw/master/xhtml+rdfa.template.html">raw source</a>.</p>]]></content><author><name>Egon Willighagen</name></author><category term="html" /><category term="rdf" /><category term="rdfa" /><summary type="html"><![CDATA[There was some more discussion on machine readability of notebooks again, something I have blogged about for a long time now.]]></summary></entry><entry><title type="html">Script logs as HTML+RDFa: mix free text reporting with CSV</title><link href="http://egonw.github.io/blog/2010/07/19/scripts-logs-as-htmlrdfa-mix-free-text.html" rel="alternate" type="text/html" title="Script logs as HTML+RDFa: mix free text reporting with CSV" /><published>2010-07-19T00:00:00+00:00</published><updated>2010-07-19T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2010/07/19/scripts-logs-as-htmlrdfa-mix-free-text</id><content type="html" xml:base="http://egonw.github.io/blog/2010/07/19/scripts-logs-as-htmlrdfa-mix-free-text.html"><![CDATA[<p><a href="http://blogs.talis.com/nodalities/author/richard-wallis/">Richard</a> (<a href="http://www.talis.com/">Talis</a>) wrote up a
<a href="http://blogs.talis.com/nodalities/2010/07/the-data-publishing-three-step.php">three-step tutorial</a> on how to publish
your data. I think I would be more than happy if scientists reached step 1. Related, Ola asked me a while ago if I
was interested in using the computing facilities of <a href="http://www.uppmax.uu.se/">UPPMAX</a>, and I was. But until this
weekend I did not have the time or energy to give it a spin. If you are puzzled how the heck I see those two items
related, read on :)</p>

<p>Two days later, today, I ran my first analysis. Still a test run, but using the <a href="http://cdk.sf.net/">CDK</a> to perceive
atom types on the first 2.5 GB of <a href="http://pubchem.ncbi.nlm.nih.gov/">PubChem</a> data. The full data set is now 80 GB,
and I will start doing this analysis today. You might remember this already two years ago (see
<a href="http://chem-bla-ics.blogspot.com/2008/05/wicked-chemistry-and-unit-testing.html">Wicked chemistry and unit testing</a>)
for a small subset, but only now have the power to analyze all compounds. The UPPMAX system I work on has 348, each
with 8 cores. Each core has 3 GB of memory, but I am using the
<a href="http://pele.farmbio.uu.se/nightly-1.2.3/cdk-javadoc-1.2.4/org/openscience/cdk/io/iterator/IteratingPCCompoundXMLReader.html">IteratingPCCompoundXMLReader</a>
class anyway. Analyzing the 2.5 GB of data was done using 50 nodes, and finished in about a minute. Nice :)</p>

<p>Now, this first run dumped the results as a plain text file, looking like:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>CID 200234: Ti  1
CID 200235: Ti 1
CID 200237: Sb 1 Sb 2
CID 200365: S 1
CID 200761: Hg 1
CID 201374: Ce 1 Ce 2
CID 201395: As 1 
</code></pre></div></div>

<p>Simple and effective.</p>

<p>Or? And this is where the two items outlined in the first paragraph meet. No, this is not useful. Since the output
is from an analysis of PubChem, I’m sure you already figured out that the first two columns indicate the compound
being analyzed. You might also work out that then the elements are given for which the atom type perception failed.
You may even figure out that the number is likely to be the index in the connection table representation of the
molecule. Right?</p>

<p>But what about machine readability? I could, of course, write the output as CSV, but then I would loose my ability
to write the report in human readable format. And moreover, the list of failing atom types does not have a fixed
length, as you can see in the example lines given earlier.</p>

<p>Now, this is where RDF comes in. If I create my output as HTML+RDFa, I can do fancy stuff. My results page could
link directly to PubChem, so that I can inspect the actual compound. Though I could do that even with merely HTML.
But with <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">RDFa</a>, I can actually make my free text log output machine
readable. I can accurately annotate what bits are informative:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;div</span> <span class="na">about=</span><span class="s">"#200234"</span> <span class="na">typeof=</span><span class="s">"um:Compound"</span><span class="nt">&gt;</span>CID
  <span class="nt">&lt;span</span> <span class="na">property=</span><span class="s">"um:cid"</span> <span class="na">datatype=</span><span class="s">"xsd:integer"</span><span class="nt">&gt;</span>200234<span class="nt">&lt;/span&gt;</span>:
  <span class="nt">&lt;span</span> <span class="na">rel=</span><span class="s">'um:hasProblem'</span><span class="nt">&gt;</span>
    <span class="nt">&lt;span</span> <span class="na">about=</span><span class="s">'#error0'</span> <span class="na">typeof=</span><span class="s">'um:Problem'</span><span class="nt">&gt;</span>
      <span class="nt">&lt;span</span> <span class="na">property=</span><span class="s">'um:hasElement'</span><span class="nt">&gt;</span>Ti<span class="nt">&lt;/span&gt;</span>
      <span class="nt">&lt;span</span> <span class="na">property=</span><span class="s">'um:hasIndex'</span> <span class="na">datatype=</span><span class="s">'xsd:integer'</span><span class="nt">&gt;</span>1<span class="nt">&lt;/span&gt;</span>
    <span class="nt">&lt;/span&gt;</span>
  <span class="nt">&lt;/span&gt;</span>
<span class="nt">&lt;/div&gt;</span>
</code></pre></div></div>

<p>The file is not backed up by an OWL ontology, but where possible one would do that. Reuse of ontologies is a good
thing (e.g. use a service like <a href="http://schemapedia.com/">Schemapedia</a>).</p>

<p>Now, I can easily open up this file in a web browser (follow <a href="http://rdf.farmbio.uu.se/uppmax-cdk/results.html">this link</a>)
and get the same view as above. But I can also import the file directly into Bioclipse (see
<a href="http://chem-bla-ics.blogspot.com/2010/01/semantic-web-features-in-bioclipse-22.html">Semantic Web features in Bioclipse 2.2</a>),
or in any other tool that supports RDFa. I can then use SPARQL to do some first analysis, for example, with:</p>

<div class="language-sparql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">PREFIX</span><span class="w"> </span><span class="nn">um</span><span class="o">:</span><span class="w"> </span><span class="nn">&lt;http://egonw.github.com/uppmax&gt;</span><span class="w">

</span><span class="k">SELECT</span><span class="w"> </span><span class="nv">?elem</span><span class="w"> </span><span class="p">(</span><span class="nb">count</span><span class="p">(</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="nv">?count</span><span class="p">)</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="p">{</span><span class="w">
  </span><span class="nv">?compound</span><span class="w"> </span><span class="nn">um</span><span class="o">:</span><span class="ss">cid</span><span class="w"> </span><span class="nv">?cid</span><span class="p">;</span><span class="w">
     </span><span class="nn">um</span><span class="o">:</span><span class="ss">hasProblem</span><span class="w"> </span><span class="nv">?problem</span><span class="w"> </span><span class="p">.</span><span class="w">
  </span><span class="nv">?problem</span><span class="w"> </span><span class="nn">um</span><span class="o">:</span><span class="ss">hasElement</span><span class="w"> </span><span class="nv">?elem</span><span class="w"> </span><span class="p">.</span><span class="w">
</span><span class="p">}</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="nv">?elem</span><span class="w"> </span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="nv">?elem</span><span class="w">
</span></code></pre></div></div>

<p>Combine that with the <a href="http://rdfadev.sourceforge.net/">RDFaDev</a> tool I wrote about last week (see
<a href="http://chem-bla-ics.blogspot.com/2010/07/rdfadev-htmlrdfa-development-with.html">RDFaDev: HTML+RDFa development with FireFox</a>).
Now you should get some feeling of the advantages of using Open Standards: I can do some initial analysis of the results,
just right there in the web browser you have open anyway:</p>

<p><img src="/blog/assets/images/rdfaLogfiles.png" alt="" /></p>

<p>Therefore, next time you ask your data analyst to perform some calculation, insist that he sends you HTML+RDFa log files with
results. Better, ask him to put it online, and you immediately reach
<a href="http://blogs.talis.com/nodalities/2010/07/the-data-publishing-three-step.php">Step 3</a>
in the analysis by David.</p>]]></content><author><name>Egon Willighagen</name></author><category term="html" /><category term="rdf" /><category term="sparql" /><category term="rdfa" /><summary type="html"><![CDATA[Richard (Talis) wrote up a three-step tutorial on how to publish your data. I think I would be more than happy if scientists reached step 1. Related, Ola asked me a while ago if I was interested in using the computing facilities of UPPMAX, and I was. But until this weekend I did not have the time or energy to give it a spin. If you are puzzled how the heck I see those two items related, read on :)]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://egonw.github.io/blog/blog/assets/images/rdfaLogfiles.png" /><media:content medium="image" url="http://egonw.github.io/blog/blog/assets/images/rdfaLogfiles.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">RDFaDev: HTML+RDFa development with FireFox</title><link href="http://egonw.github.io/blog/2010/07/16/rdfadev-htmlrdfa-development-with.html" rel="alternate" type="text/html" title="RDFaDev: HTML+RDFa development with FireFox" /><published>2010-07-16T00:10:00+00:00</published><updated>2010-07-16T00:10:00+00:00</updated><id>http://egonw.github.io/blog/2010/07/16/rdfadev-htmlrdfa-development-with</id><content type="html" xml:base="http://egonw.github.io/blog/2010/07/16/rdfadev-htmlrdfa-development-with.html"><![CDATA[<p><a href="http://www.blogger.com/profile/14759936105694870796">Celso</a> informed me in <a href="http://chem-bla-ics.blogspot.com/2007/06/chemical-rdfa-with-operator-in-firefox.html">this old post</a>
about an alternative to <a href="http://chem-bla-ics.blogspot.com/2007/08/operator-08-released-new-sechemtic-user.html">Operator</a> for RDFa handling in browsers, or
<a href="http://firefox.com/">Firefox</a> in this case: the <a href="http://rdfadev.sourceforge.net/">RDFaDev add-on</a>. It works quite well, extracts the RDFa, reports common problems, and
even allows running SPARQL directly on the web page, all from within a browser pop up window:</p>

<p><img src="/blog/assets/images/ffRDFa1.png" alt="" /></p>]]></content><author><name>Egon Willighagen</name></author><category term="rdf" /><category term="html" /><category term="rdfa" /><summary type="html"><![CDATA[Celso informed me in this old post about an alternative to Operator for RDFa handling in browsers, or Firefox in this case: the RDFaDev add-on. It works quite well, extracts the RDFa, reports common problems, and even allows running SPARQL directly on the web page, all from within a browser pop up window:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://egonw.github.io/blog/blog/assets/images/ffRDFa1.png" /><media:content medium="image" url="http://egonw.github.io/blog/blog/assets/images/ffRDFa1.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Program for the RDF symposium at the American Chemical Society fall meeting</title><link href="http://egonw.github.io/blog/2010/06/26/it-is-my-great-pleasure-to-present-full.html" rel="alternate" type="text/html" title="Program for the RDF symposium at the American Chemical Society fall meeting" /><published>2010-06-26T00:00:00+00:00</published><updated>2010-06-26T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2010/06/26/it-is-my-great-pleasure-to-present-full</id><content type="html" xml:base="http://egonw.github.io/blog/2010/06/26/it-is-my-great-pleasure-to-present-full.html"><![CDATA[<p>It is my great pleasure to present the full symposium program for the RDF session at the <a href="http://www.acs.org/">American Chemical Society</a>
at the Boston meeting in August:</p>

<p><a href="https://egonw.github.com/acsrdf2010/">http://egonw.github.com/acsrdf2010/</a></p>

<p>I am excited that on Monday afternoon <a href="http://esw.w3.org/Eric_Prud'hommeaux">Eric Prud’hommeaux</a> will present the work of the
<a href="http://esw.w3.org/HCLSIG/LODD">LODD working group</a> to the chemistry community. The symposium contains three half day sessions with
topics on computing, ontologies, and applications, all chemistry oriented. The goal of the meeting is to get together people using
RDF technologies in chemistry, and the list of talks from around the world shows that this goal has been reached. The program is
diverse and exciting, and I am very much looking forward to meeting all participants to discuss challenges and cool solutions.</p>

<p><img src="/blog/assets/images/acsrdf.png" alt="" /></p>

<p>People interested in joining, can sign up to the <a href="https://groups.google.com/group/acsrdf2010">meeting mailing list</a>. Besides
that the webpage is in <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">XHTML+RDFa</a>, the source is also available on GitHub (well, you
really download the source code anyway), allowing people to <a href="http://egonw.github.com/acsrdf2010/#morerdfa">happily fork</a>, make
changes, and perhaps make the page as triple-dense as is possible.</p>

<p>I am also keen to have mastered some <a href="http://jquery.com/">jQuery</a> skills, and the Abstract links on the webpage use jQuery to
show and hide them.</p>]]></content><author><name>Egon Willighagen</name></author><category term="acsrdf2010" /><category term="acs" /><category term="rdf" /><category term="rdfa" /><summary type="html"><![CDATA[It is my great pleasure to present the full symposium program for the RDF session at the American Chemical Society at the Boston meeting in August:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://egonw.github.io/blog/blog/assets/images/acsrdf.png" /><media:content medium="image" url="http://egonw.github.io/blog/blog/assets/images/acsrdf.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Citing the Chemistry Development Kit</title><link href="http://egonw.github.io/blog/2010/02/18/citing-chemistry-development-kit.html" rel="alternate" type="text/html" title="Citing the Chemistry Development Kit" /><published>2010-02-18T00:00:00+00:00</published><updated>2010-02-18T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2010/02/18/citing-chemistry-development-kit</id><content type="html" xml:base="http://egonw.github.io/blog/2010/02/18/citing-chemistry-development-kit.html"><![CDATA[<p>Two weeks ago, a paper by Peter Ertl was published about <a href="http://www.jcheminf.com/content/2/1/1">Molecular structure input on the web</a>
(doi:<a href="https://doi.org/10.1186/1758-2946-2-1">10.1186/1758-2946-2-1</a>). In this paper, he discusses the state of things and describes his
contribution to this field, the <a href="http://www.molinspiration.com/jme/">JME Molecule Editor</a>. The article also cites the CDK, but only
the website and not one of the two papers (doi:<a href="https://doi.org/10.1021/ci025584y">10.1021/ci025584y</a>, or
doi:<a href="10.2174/138161206777585274">10.2174/138161206777585274</a>). This is not an isolated case, but a common pattern. In principle, the
proper work is cited, and nothing is wrong. Practically it means, that a citation to the <a href="http://cdk.sf.net/">CDK website</a>
does not show up in the citation network. This is <strong><em>not</em></strong> a problem caused by these papers, but merely by the nature current citation
databases work: they only count citations between journal articles, and only sometimes extend to books or conference abstracts.</p>

<p>Now, addressing the limitations of the current citation databases is technically simple, and purely blocked by social and commercial
aspects. The Citation Typing Ontology by <a href="http://www.zoo.ox.ac.uk/staff/academics/shotton_dm.htm">David Shotton</a> defines the framework
to define citation types, independent from any existing database. The semantic web technologies will take it from there, and allow
aggregation etc.</p>

<p>There are some things to think about on how to use such citation networks, though. If we calculate the impact of the CDK project,
we should combine citation counts to the website(s), papers, etc, after removal of duplicates, etc. The
<a href="http://imageweb.zoo.ox.ac.uk/pub/2009/citobase/cito-20090311/cito-content/owldoc/objectproperties/cites.html">cito:cites</a> does
link to resources, and the CDK paper resources is not the same as the CDK website resource. But, we could define a Project Class,
where both are foo:partOf. Then, we could define that <em>the triple chain the:citingWork cito:cites the:CDKArticle foo:partOf the:CDKProject</em>
would imply <em>the triple the:citingWork cito:cites the:CDKProject</em>.</p>

<h2 id="typed-citations">Typed Citations</h2>

<p>Now, while writing up this blog, I realize that my fork of this morning, <a href="http://github.com/egonw/bibo-cto">A BIBO Citation Typing Ontology</a>,
might actually be counter-productive in the long run, as I was only working out a solution to a simpler, but different problem, which the
CiTO also addresses: a citation is not typed. When a paper does cite the CDK paper, we still do not know if it <em>uses</em> the CDK, or
merely mentioned it as <em>related-but-unused</em>, or even <em>refuted</em> work.</p>

<p>Now, as I am leaning towards the Biobliography Ontology as RDF-based system for my references, and been using this already in the
<a href="http://rdf.farmbio.uu.se/chembl/snorql/">RDF store hosting the ChEMBL data</a>,
I forked the CiTO to define rdfs:domain and rdfs:range on <a href="http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/classes/Document___-538479979.html">bibo:Document</a>.
The CiTO 1.5 actually defines a large set of document types too, and I rather see BIBO reused.</p>

<p>This indeed has the downside that the bibocto:cites cannot be used for the above chaining, and this might bite me seriously later.
Well, nothing wrong with a failing experiment, right? For now, it will serve my purpose: setting up a citation database for the CDK
project papers.</p>

<h2 id="the-cdk-citation-database">The CDK citation database</h2>

<p>So, here goes (it’s <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">RDFa-enabled</a>; check this
<a href="http://www.w3.org/2007/08/pyRdfa/extract?uri=http://chem-bla-ics.blogspot.com/2010/02/citing-chemistry-development-kit.html">RDF pulled out</a>):</p>

<pre xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibocto="http://github.com/egonw/bibo-cto/" about="urn:doi:10.1021/ci025584y" rel="bibocto:cites" typeof="bibo:Article">@prefix bibo: &lt;http://purl.org/ontology/bibo/&gt;.
@prefix bibocto: &lt;http://github.com/egonw/bibo-cto/&gt;.

&lt;urn:doi:10.1186/1758-2946-2-1&gt; a bibo:Article ;
  bibocto:cites <span about="urn:doi:10.1021/ci025584y">&lt;urn:doi:10.1021/ci025584y&gt;</span> .
</pre>

<p>I am not entirely happy about the error-prone XHTML+RDFa of the above example, and
<a href="http://www.semanticoverflow.com/questions/573/how-to-create-rdfa-powered-n3-in-the-html-output">filed a question of better solution</a> on
<a href="http://www.semanticoverflow.com/">SemanticOverflow</a>.</p>

<p>While the above example merely defines the citation of Peter Ertl’s article to the CDK (whether that is valid or not… would
he have cited the other paper perhaps?), the citation typing allows me to state how the CDK paper is cited. Now, Peter states:</p>

<blockquote>
  <p>It is also gratifying to see the advent of open source movement in cheminformatics on the Internet, as advocated for example
by the Blue Obelisk Group (<a href="http://blueobelisk.sourceforge.net/wiki/Main_Page">40</a>) and witnessed by collaborative projects
like Chemistry Development Kit CDK (<a href="http://sourceforge.net/apps/mediawiki/cdk/index.php?title=Main_Page">41</a>),
Jmol (<a href="http://jmol.sourceforge.net/">42</a>), Bioclipse (<a href="http://www.bioclipse.net/">43</a>) and several others.</p>
</blockquote>

<p>So, I think it is fair to state that:</p>

<pre xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibocto="http://github.com/egonw/bibo-cto/" about="urn:doi:10.1021/ci025584y" rel="bibocto:credits">&lt;urn:doi:10.1186/1758-2946-2-1&gt; bibocto:credits <span about="urn:doi:10.1021/ci025584y">&lt;urn:doi:10.1021/ci025584y&gt;</span> .
</pre>

<p>which is very much appreciated!</p>]]></content><author><name>Egon Willighagen</name></author><category term="cdk" /><category term="cito" /><category term="bioclipse" /><category term="jchempaint" /><category term="jmol" /><category term="rdf" /><category term="owl" /><category term="justdoi:10.1186/1758-2946-2-1" /><category term="doi:10.1021/CI025584Y" /><category term="doi:10.1021/CI025584Y" /><category term="rdfa" /><summary type="html"><![CDATA[Two weeks ago, a paper by Peter Ertl was published about Molecular structure input on the web (doi:10.1186/1758-2946-2-1). In this paper, he discusses the state of things and describes his contribution to this field, the JME Molecule Editor. The article also cites the CDK, but only the website and not one of the two papers (doi:10.1021/ci025584y, or doi:10.2174/138161206777585274). This is not an isolated case, but a common pattern. In principle, the proper work is cited, and nothing is wrong. Practically it means, that a citation to the CDK website does not show up in the citation network. This is not a problem caused by these papers, but merely by the nature current citation databases work: they only count citations between journal articles, and only sometimes extend to books or conference abstracts.]]></summary></entry><entry><title type="html">Semantic Web features in Bioclipse 2.2</title><link href="http://egonw.github.io/blog/2010/01/28/semantic-web-features-in-bioclipse-22.html" rel="alternate" type="text/html" title="Semantic Web features in Bioclipse 2.2" /><published>2010-01-28T00:00:00+00:00</published><updated>2010-01-28T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2010/01/28/semantic-web-features-in-bioclipse-22</id><content type="html" xml:base="http://egonw.github.io/blog/2010/01/28/semantic-web-features-in-bioclipse-22.html"><![CDATA[<p><a href="http://www.blogger.com/profile/10379047094508592338">Ola</a> is releasing <a href="http://web.archive.org/web/20100111032721/https://bioclipse.net/">Bioclipse <i class="fa-solid fa-box-archive fa-xs"></i></a>
<a href="http://sourceforge.net/projects/bioclipse/files/bioclipse2/bioclipse2.2.0/">2.2.0</a>
today, and asked me to show case the semantic web functionality in Bioclipse. I realized that I do not have a nice page showing the semantic web overview. But I did blog a lot about RDF functionality, so here’s a list of pointers:</p>

<ul>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/11/bioclipse-manager-for-myexperimentorg.html">Bioclipse Manager for MyExperiment.org</a></li>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/09/bioclipse-rdf-and-defeasible-reasoning.html">Bioclipse, RDF and defeasible reasoning</a> (see also <a href="http://saml.rilspace.com/">Samuel’s blog</a>)</li>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/08/bioclipse-and-sparql-end-points-2.html">Bioclipse and SPARQL end points #2: MyExperiment</a></li>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/08/bioclipse-and-sparql-end-points.html">Bioclipse and SPARQL end points</a></li>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/02/solubility-data-in-bioclipse-2-handling.html">Solubility Data in Bioclipse #2: handling RDF</a></li>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/02/solubility-data-in-bioclipse-3-finding.html">Solubility Data in Bioclipse #3: Finding ChEBI IDs</a></li>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/03/solubility-data-in-bioclipse-4-finding.html">Solubility Data in Bioclipse #4: Finding ChEBI IDs (Again, but better)</a></li>
  <li><a href="http://chem-bla-ics.blogspot.com/2009/05/me-is-having-bioclipsexmpprdf-fun.html">/me is having Bioclipse/XMPP/RDF fun</a></li>
</ul>

<p>Or check this screenshot from <a href="http://web.archive.org/web/20130310013833/http://egonw.posterous.com/molecules-in-dbpedia-visualized-with-bioclips">a Posterous post about a MyExperiment workflow
<i class="fa-solid fa-box-archive fa-xs"></i></a>:</p>

<p><img src="/blog/assets/images/dbPediaMolTable.png" alt="" /></p>

<p>One thing I have not blogged about yet (I think), is that the Bioclipse RDF manager also understands RDFa now. Well, sort of… it relies on a webservice, but this is what the script looks like:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">model</span> <span class="o">=</span> <span class="nx">rdf</span><span class="p">.</span><span class="nf">createStore</span><span class="p">()</span>
<span class="nx">rdf</span><span class="p">.</span><span class="nf">importRDFa</span><span class="p">(</span><span class="nx">model</span><span class="p">,</span> <span class="dl">"</span><span class="s2">http://egonw.github.com/</span><span class="dl">"</span><span class="p">)</span>
<span class="nx">rdf</span><span class="p">.</span><span class="nf">saveRDFN3</span><span class="p">(</span><span class="nx">model</span><span class="p">,</span> <span class="dl">"</span><span class="s2">/Virtual/egonw.n3</span><span class="dl">"</span><span class="p">)</span>
</code></pre></div></div>

<p>With support of SPARQL end points, and reading RDF from web resources directly (RDF/XML, N3, RDFa), Bioclipse is ready for the chemical semantic web.</p>]]></content><author><name>Egon Willighagen</name></author><category term="java" /><category term="bioclipse" /><category term="rdf" /><category term="sparql" /><category term="rdfa" /><summary type="html"><![CDATA[Ola is releasing Bioclipse 2.2.0 today, and asked me to show case the semantic web functionality in Bioclipse. I realized that I do not have a nice page showing the semantic web overview. But I did blog a lot about RDF functionality, so here’s a list of pointers:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://egonw.github.io/blog/blog/assets/images/dbPediaMolTable.png" /><media:content medium="image" url="http://egonw.github.io/blog/blog/assets/images/dbPediaMolTable.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Semantic Chemistry with the Resource Description Framework</title><link href="http://egonw.github.io/blog/2010/01/25/semantic-chemistry-with-resource.html" rel="alternate" type="text/html" title="Semantic Chemistry with the Resource Description Framework" /><published>2010-01-25T00:00:00+00:00</published><updated>2010-01-25T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2010/01/25/semantic-chemistry-with-resource</id><content type="html" xml:base="http://egonw.github.io/blog/2010/01/25/semantic-chemistry-with-resource.html"><![CDATA[<p><strong>First Call for Papers</strong> <br />
Semantic Chemistry with the Resource Description Framework <br />
240th ACS National Meeting &amp; Exposition <br />
Boston, Massachusetts, August 22-26, 2010 <br />
CINF Division</p>

<p>We now invite papers for our symposium on the use of the Resource Description Framework (RDF) technologies in semantic knowledge representation
and data exchange in chemistry at the 240th National Meeting &amp; Exposition of the American Chemical Society (ACS) in Boston this fall.</p>

<p>Semantic Chemistry has been around for a while, but is seeing a revival with the adoption of the Resource Description Framework (RDF) and
matching technologies in chemistry. RDF triples provide a simple structure that allow data and knowledge alike to be presented in a single
framework. Derived technologies include the capturing of ontologies with the Web Ontology Language (OWL) and performing queries with SPARQL.
A wide variety of free and open source product make it easy to set up servers with large amounts of RDF data, while integration with HTML
is available too with RDFa.</p>

<p>The RDF symposium at the 240th ACS national meeting in Boston invites submissions of talks about the use of RDF in chemistry and cheminformatics.
Topics could include the use of OWL ontologies, OWL axioms, reasoning and interference, RDF in user interfaces, such as RDFa in web front ends,
visualization, querying systems, and applications thereof, such as linking data sets, compound classification, cloud computing, web services,
data aggregation, semantic publishing, and literature mining.</p>

<p>Abstracts may be submitted via http://abstracts.acs.org. You’ll find the RDF session as part of the CINF division symposiums. Submissions open
January 25, 2010, and the deadline is March 28, 2010. In case of questions, please email Egon Willighagen at egon.willighagen@farmbio.uu.se or
Martin Braendle at braendle@chem.ethz.ch.</p>]]></content><author><name>Egon Willighagen</name></author><category term="acs" /><category term="acsrdf2010" /><category term="rdf" /><category term="chemistry" /><category term="sparql" /><category term="rdfa" /><summary type="html"><![CDATA[First Call for Papers Semantic Chemistry with the Resource Description Framework 240th ACS National Meeting &amp; Exposition Boston, Massachusetts, August 22-26, 2010 CINF Division]]></summary></entry><entry><title type="html">CDK Molecules in RDF</title><link href="http://egonw.github.io/blog/2009/10/06/cdk-molecules-in-rdf.html" rel="alternate" type="text/html" title="CDK Molecules in RDF" /><published>2009-10-06T00:00:00+00:00</published><updated>2009-10-06T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2009/10/06/cdk-molecules-in-rdf</id><content type="html" xml:base="http://egonw.github.io/blog/2009/10/06/cdk-molecules-in-rdf.html"><![CDATA[<p>Yesterday, I finally got around to starting a <a href="http://github.com/egonw/cdk/tree/73-rdf">branch</a> on adding RDF support to the
<a href="http://cdk.sf.net/">CDK</a>; in particular, write the CDK data model ontology in <a href="http://en.wikipedia.org/wiki/Web_Ontology_Language">OWL</a>
and serialization to and from RDF using the ontology. The framework is now set up, but I have yet to formalize all bits and pieces
of the CDK data model in classes and properties. Just as a preview, here is what a very basic bit of CDK model in RDF looks like
(<a href="http://en.wikipedia.org/wiki/Notation3">N3 format</a>):</p>

<pre><code class="language-notation3">@prefix cdk:     &lt;http://cdk.sourceforge.net/model.owl#&gt; .

&lt;http://cdk.sf.net/model/atom/1&gt;
      a       cdk:Atom ;
      cdk:symbol "C" .

&lt;http://cdk.sf.net/model/molecule/1&gt;
      a       cdk:Molecule ;
      cdk:hasAtom  .
</code></pre>

<p>Still rather verbose, but very flexible. I have even been thinking of an XHTML+RDFa writer…</p>]]></content><author><name>Egon Willighagen</name></author><category term="cdk" /><category term="rdf" /><category term="rdfa" /><summary type="html"><![CDATA[Yesterday, I finally got around to starting a branch on adding RDF support to the CDK; in particular, write the CDK data model ontology in OWL and serialization to and from RDF using the ontology. The framework is now set up, but I have yet to formalize all bits and pieces of the CDK data model in classes and properties. Just as a preview, here is what a very basic bit of CDK model in RDF looks like (N3 format):]]></summary></entry><entry><title type="html">My HTML+RDFa homepage</title><link href="http://egonw.github.io/blog/2009/09/18/my-htmlrdfa-homepage.html" rel="alternate" type="text/html" title="My HTML+RDFa homepage" /><published>2009-09-18T00:00:00+00:00</published><updated>2009-09-18T00:00:00+00:00</updated><id>http://egonw.github.io/blog/2009/09/18/my-htmlrdfa-homepage</id><content type="html" xml:base="http://egonw.github.io/blog/2009/09/18/my-htmlrdfa-homepage.html"><![CDATA[<p>Finally got around to adding a few more bits to my new science homepage: <a href="http://egonw.github.com/">egonw.github.com</a>. Cool thing about this new page is that it is
<a href="http://www.w3.org/TR/rdfa-syntax/">HTML+RDFa</a>, so, my new <a href="http://en.wikipedia.org/wiki/FOAF_%28software%29">FOAF</a> profile is embedded in the HTML:</p>

<p><img src="/blog/assets/images/egonwGithub.png" alt="" /></p>

<p>Down the bottom is link to extract the RDF triples:</p>

<p><img src="/blog/assets/images/egonwGithub1.png" alt="" /></p>

<p>Next, is to write a piece of code that creates HTML+RDFa+BIBO from a BibTeX file, and to write a plugin for Bioclipse to extract triples from HTML+RDFA.</p>]]></content><author><name>Egon Willighagen</name></author><category term="html" /><category term="rdf" /><category term="foaf" /><category term="rdfa" /><summary type="html"><![CDATA[Finally got around to adding a few more bits to my new science homepage: egonw.github.com. Cool thing about this new page is that it is HTML+RDFa, so, my new FOAF profile is embedded in the HTML:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://egonw.github.io/blog/blog/assets/images/egonwGithub1.png" /><media:content medium="image" url="http://egonw.github.io/blog/blog/assets/images/egonwGithub1.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>